﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MiUi.ShuaMi
{
   public class Helpers
    {
        /// <summary>
        /// 返回URL编码字符
        /// </summary>
        /// <param name="strIn">需要编码的内容</param>
        /// <param name="encoding">编码</param>
        /// <returns></returns>
       public static string StrConvUrlEncoding(string strIn, Encoding encoding)
        {
            return System.Web.HttpUtility.UrlEncode(strIn, encoding);
        }

       /// <summary>
       /// 将字符串转换为 Unicode 字符串。
       /// </summary>
       /// <param name="strIn"></param>
       /// <returns></returns>
       public static string StrUrlEncodeUnicode(string strIn)
       {
           return System.Web.HttpUtility.UrlEncodeUnicode(strIn);
       }

    }
}
